<template>
	<view class="content">
		<view class="aooo">
			<view class="active">
				<view class="timi">
					<input class="weui-input" placeholder="输入大厦名称或地点"  placeholder-class="beter" />
				</view>
				<image class="activeLine" src="../../static/imges/xx2.png" mode=""></image>
			</view>
			<view class="all">
				<AddressPicker @change="change" :level="3" class="buanyan">
					<view class="uni-input">{{array}}</view>
					<image class="anchor" src="../../static/imges/bg_yellow.png" mode=""></image>
				</AddressPicker>
				<picker class="aoot" @change="bindPickerChange2" :value="index2" :range="att">
					<view class="uni-input">{{att[index2]}}</view>
					<image class="anchor" src="../../static/imges/bg_yellow.png" mode=""></image>
				</picker>
				<picker class="aoot" @change="bindPickerChange3" :value="index3" :range="arr">
					<view class="uni-input">{{arr[index3]}}</view>
					<image class="anchor" src="../../static/imges/bg_yellow.png" mode=""></image>
				</picker>
				<picker class="aoot" @change="bindPickerChange4" :value="index4" :range="attr">
					<view class="uni-input">{{attr[index4]}}</view>
					<image class="anchor" src="../../static/imges/bg_yellow.png" mode=""></image>
				</picker>
			</view>
		</view>
		<view class="page-section page-section-gap">
			<map style="width: 100%; height: 1100rpx;" :latitude="latitude" :longitude="longitude" :markers="covers">
			</map>
		</view>
		<view class="botteer">
			<image class="box" src="../../static/imges/details1.png" mode=""></image>
			<view class="lian">
				<view class="box4">泰禹云开壹品</view>
				<view class="box5">近30天共有108人关注</view>
				<view class="box6" style="margin-left: 10rpx;color: #027FC5;">雨花区·芙蓉中路雨花亭</view>
				<view class="butde">
					<text style="font-weight: 600;">￥4300</text><text class="box7">万元/月</text>
				</view>
			</view>
		</view>

	</view>
</template>
<script>
	import AddressPicker from "@/components/addressPicker/AddressPicker.vue";
	export default {
		components: {AddressPicker},
		data() {
			return {	
				array: '区域', 
				att: ['面积(m²)', '56-98', '102-132','200','更多'],
				arr: ['价格(万)', '56-100', '100-200', '200-300','更多'],
				attr: ['楼层(层)', '1-10', '11-20', '21-30','31-40','41-50','更多'],
				index2: 0,
				index3: 0,
				index4: 0,
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 39.909,
				longitude: 116.39742,
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
					iconPath: '../../../static/location.png'
				}, {
					latitude: 39.90,
					longitude: 116.39,
					iconPath: '../../../static/location.png'
				}]
			};
		},
		computed: {

		},
		onLoad() {},
		
		  methods: {
			  change(result) {
			      console.log(JSON.stringify(result.data));
			      this.planLocate = '';
			      result.data.forEach((item, index) => {
			       if (index === 0) {
			        this.planLocate += item.name
			       } else {
			        this.planLocate += '-' + item.name
			       }
			      });
			      let arr = this.planLocate.split('-');
			      console.log(arr)
			     },
			bindPickerChange: function(e) {
				this.index = e.target.value
			},
			bindPickerChange2: function(e) {
				this.index2 = e.target.value
			},
			bindPickerChange3: function(e) {
				this.index3 = e.target.value
			},
			bindPickerChange4: function(e) {
				this.index4 = e.target.value
			}
		}
	};
</script>

<style>
	.timi {
		background-color: #F5F5F5;
		width: 88%;
		height: 70rpx;
		border-radius: 50rpx;
		position: fixed;
	}

	.weui-input {
		width: 500rpx;
		line-height: 70rpx;
		height: 70rpx;
		font-size: 20rpx;
		background-image: url(../../static/imges/ss.png);
		background-size: 35rpx 35rpx;
		background-position: 25rpx 20rpx;
		background-repeat: no-repeat;
		padding-left: 70rpx;
	}

	.activeLine {
		width: 60rpx;
		height: 60rpx;
		position: fixed;
		right: 20rpx;
	}

	.active {
		display: flex;
		justify-content: space-between;
		position: relative;
		top: 30rpx;
		margin: 30rpx 20rpx 0 20rpx;
	}

	.all {
		width: 100%;
		height: 70rpx;
		display: flex;
		text-align: center;
		position: relative;
		margin-top: 60rpx;
		top: 60rpx;
		margin-left: 6%;
	}

	.anchor {
		width: 30rpx;
		height: 30rpx;
		position: relative;
		top: -10rpx;
		margin-left: 50rpx;
	}

	.aooo {
		position: fixed;
		z-index: 999;
		background-color: #FFFFFF;
		width: 100%;
		height: 220rpx;
	}

	.aoot {
		margin-left: 100rpx;
	}

	picker {
		width: 75rpx;
	}

	.page-section {
		position: relative;
		top: 220rpx;
	}

	.botteer {
		position: fixed;
		bottom: 100rpx;
		display: flex;
		width: 100%;
		height: 260rpx;
		justify-content: space-between;
		background-color: #FFFFFF;
		border-bottom: 1rpx solid #E7E7E7;
	}

	.box {
		width: 250rpx;
		height: 200rpx;
		border-radius: 20rpx;
		margin: 30rpx 0 0 30rpx;
	}

	.lian {
		width: 330rpx;
		margin-right: 100rpx;
		margin-top: 30rpx;
	}

	.box6,
	.box7 {
		font-size: 12rpx;
		margin-top: 20rpx;
	}

	.box5 {
		font-size: 26rpx;
		margin-top: 15rpx;
		color: #BCBCBC;
	}

	.butde {
		margin-top: 15rpx;
		color: #C92B29;
	}
	.uni-input{
		width: 130rpx;
		text-align: center;
	}
</style>
